<template>
  <fieldset>
    <legend>子</legend>
    <h1>子</h1>
    <h2>receive:{{ gg }}</h2>
    <button @click="send">点击</button>
  </fieldset>
</template>

<script>
export default {
  data() {
    return {
      val: "kk",
    };
  },
  props: {
    gg: {
      type: String,
    },
  },
  methods: {
    send() {
      this.$emit("dd", this.val);
    },
  },
  mounted() {
    this.$bus.$on("cath2", (value) => {
      console.log(value);
    });
  },
};
</script>
